#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;

void solve()
{
    int n, H;
    cin >> n >> H;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    vector<pair<double, int>> v(n);
    for (int i = 0; i < n; i++)
    {
        v[i].second = i + 1;
        v[i].first = 2 * sqrt(a[i] * (H - a[i]));
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < n; i++) cout << v[i].second << ' ';
    cout << endl;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}